home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 2
/
Atari Mega Archive CD - Volume 2.iso
/
8bit
/
cislib_b
/
time.doc
< prev
next >
Wrap
Text File
|
1995-04-22
|
2KB
|
66 lines
TIME
TIME is a BASIC subroutine to get the current real-time clock value in
"jiffies" (1/60 second).
IMPORTANT NOTES
1. TIME is fully self-relocatable, so it may be moved anywhere in memory.
2. The Atari real-time clock counts from zero as of the last boot (or the
last time that the real-time clock was zeroed).
3. The jiffies are returned as an 8-byte ATASCII number in a string. [The
string should normally be set to 8-byte length before use, like
'JIFFIE$(8)="X"'. After calling TIME, the string is normally converted to a
number like "JIFFY=VAL(JIFFIE$)".]
CALLING
RETURNCODE=USR(TIME, SADR)
TIME: The address of the TIME subroutine [usually ADR(TIMESTRING$)].
SADR: Address of the string to receive the ATASCII value of the jiffies
[usually ADR(DATASTRING$)]. The string must be at least 8 bytes long.
DEMONSTRATION
TIME.BIN is a simple tokenized BASIC (binary) program which will demonstrate
the TIME subroutine. It computes the time between each pressing of the RETURN
key (and shows a way to compute normal clock time).
USE
To use the subroutine, just transfer the statements 900-904 to your own
program (you could do a LIST "D:TEMP",900,904 from the demo followed by an ENTER
"D:TEMP" into your own program); of course, you can renumber the statements as
necessary. Remember to call the subroutine once at the beginning of your program
to set it up.
-John Navas [72645,1070]